/*
 * 文件名： UpStreamData.java
 * 
 * 创建日期： 2017年1月9日
 *
 * Copyright(C) 2017, by <a href="mailto:liws@xingyuanauto.com">liws</a>.
 *
 * 原始作者: liws
 *
 */
package com.moli.iov.gateway.server.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;

import io.netty.channel.Channel;

/**
 * 终端上报数据实体
 *
 * @author <a href="mailto:liws@xingyuanauto.com">liws</a>
 *
 * @version $Revision$
 *
 * @since 2017年1月9日
 */
public class UpStreamData implements Serializable {

	/** 
	*/
	private static final long serialVersionUID = 1L;

	public Date reqDateTime;

	public Channel channel;

	public byte[] dataBytes;

	public UpStreamData() {
	}

	public UpStreamData(Channel channel, Date dateTime, byte[] bytes) {
		this.channel = channel;
		this.reqDateTime = dateTime;
		this.dataBytes = bytes;
	}
    /** 
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {

        StringBuilder builder = new StringBuilder();
        builder.append("UpStreamData [reqDateTime=");
        builder.append(reqDateTime);
        builder.append(", channel=");
        builder.append(channel);
        builder.append(", dataBytes=");
        builder.append(Arrays.toString(dataBytes));
        builder.append("]");
        return builder.toString();
    }
	
}
